<template>
  <el-card>
    <el-menu
        class="el-menu-demo"
        mode="horizontal"
        default-active='0'
        active-text-color="#f83683"
        @select="handleSelect">
      <el-menu-item>优惠价管理</el-menu-item>
    </el-menu>
  </el-card>
  <el-card style="margin-top: 10px;height: 100vh">
    <el-form>
      <el-form :inline="true">
        <el-form-item>
          <el-input v-model="prStr" style="width: 200px">
            <template #prefix>
              <el-icon>
                <Search/>
              </el-icon>
            </template>
          </el-input>
          <el-button style="margin-left: 10px">搜索</el-button>
        </el-form-item>
        <el-form-item label="商品类型:">
          <el-select v-model="goodSelector">
            <el-option v-for="(item,index) in goodState" :value="index" :label="item"/>
          </el-select>
        </el-form-item>
      </el-form>
    </el-form>
    <el-row style="display: inline">
      <span>添加优惠商品 <span style="color:#f83683;">0</span> 件</span>
      <span><el-button color="#f83683" style="float: right" :icon="Plus"> 添加优惠价商品</el-button></span>
    </el-row>
    <el-table style="height:100%">
      <el-table-column width="auto" align="center" label="内容"></el-table-column>
      <el-table-column width="100px" align="center" label="发布时间"></el-table-column>
      <el-table-column width="100px" align="center" label="开课日期"></el-table-column>
      <el-table-column width="100px" align="center" label="优惠时间"></el-table-column>
      <el-table-column width="80px" align="center" label="原价"></el-table-column>
      <el-table-column width="80px" align="center" label="优惠价"></el-table-column>
      <el-table-column width="100px" align="center" label="平台服务费"></el-table-column>
      <el-table-column width="80px" align="center" label="操作"></el-table-column>
    </el-table>
  </el-card>
</template>

<script setup lang="ts">
import {ref} from "vue";
import {Search, Plus} from "@element-plus/icons-vue";

const prStr = ref('')
const goodSelector = ref('')
const goodState = ref(['视频课', '线下课', '直播课'])

const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>

<style lang="less" scoped>

</style>
